<?php
/**
 * The following variables are available in this template:
 * - $this: the CrudCode object
 */
?>
<?php echo "<?php\n"; ?>
/* @var $this <?php echo $this->getControllerClass(); ?> */
/* @var $model <?php echo $this->getModelClass(); ?> */
/* @var $form CActiveForm */
?>

<div class="wide form">

<?php
	echo "\t<?php\n";
	echo "\t\$properties = array(
		'action'=>Yii::app()->createUrl(\$this->route),
		'method'=>'get',
	);\n";
	echo "\t\$form = \$this->beginWidget('CActiveForm', \$properties);\n";
	echo "\t?>\n";
	?>

<?php foreach($this->tableSchema->columns as $column): ?>
<?php
	$field = $this->generateInputField($this->modelClass, $column);
	if (strpos($field,'password') !== false || in_array($column->name, $this->_excludedColumns)) {
		continue;
	}
?>
	<div class="row">
		<?php
		echo "<?php\n";
		echo "\t\t\$form->label(\$model, '{$column->name}');\n";
		echo $this->generateActiveField($this->modelClass, $column) . "\n";
		echo "\t\t?>\n";
		?>
	</div>

<?php endforeach; ?>
	<div class="row buttons">
		<?php echo "<?php echo CHtml::submitButton('Search'); ?>\n"; ?>
	</div>

	<?php echo "<?php \$this->endWidget(); ?>\n"; ?>

</div><!-- search-form -->